<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改代码生成业务字段')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-column-edit" th:object="${dynamicColumn}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">列名称：</label>
                <div class="col-sm-8">
                    <input name="columnName" th:field="*{columnName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">显示名称,对应jqgrid的name属性：</label>
                <div class="col-sm-8">
                    <textarea name="displayName" class="form-control" required>[[*{displayName}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否主键：</label>
                <div class="col-sm-8">
                    <input name="isPk" th:field="*{isPk}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否必填：</label>
                <div class="col-sm-8">
                    <input name="isRequired" th:field="*{isRequired}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">新增时是否显示在表单(1是)：</label>
                <div class="col-sm-8">
                    <input name="isInsert" th:field="*{isInsert}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">编辑时是否显示在表单(1是)：</label>
                <div class="col-sm-8">
                    <input name="isEdit" th:field="*{isEdit}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否PC端列表显示：</label>
                <div class="col-sm-8">
                    <input name="isPcList" th:field="*{isPcList}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否是手机端列表显示(1是)：</label>
                <div class="col-sm-8">
                    <input name="isMobileList" th:field="*{isMobileList}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否是PC端查询字段(1是)：</label>
                <div class="col-sm-8">
                    <input name="isPcQuery" th:field="*{isPcQuery}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否是手机端查询字段(1是)：</label>
                <div class="col-sm-8">
                    <input name="isMobileQuery" th:field="*{isMobileQuery}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否可编辑：</label>
                <div class="col-sm-8">
                    <input name="isEditAble" th:field="*{isEditAble}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否显示此列：</label>
                <div class="col-sm-8">
                    <input name="isDisplay" th:field="*{isDisplay}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否多选,jqgrid单元格为下拉框时有此属性：</label>
                <div class="col-sm-8">
                    <input name="isMultiple" th:field="*{isMultiple}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否可以被resize,对应jqgrid的resizable属性：</label>
                <div class="col-sm-8">
                    <input name="isResize" th:field="*{isResize}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否可以排序,对应jqgrid的sortable属性：</label>
                <div class="col-sm-8">
                    <input name="isSort" th:field="*{isSort}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">列宽是否固定不变(1是)：</label>
                <div class="col-sm-8">
                    <input name="isFixed" th:field="*{isFixed}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">列宽,对应jqgrid的width属性,只能是像素值,不能是百分比：</label>
                <div class="col-sm-8">
                    <input name="width" th:field="*{width}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">当显示类型为select时,服务段的请求地址：</label>
                <div class="col-sm-8">
                    <textarea name="dataUrl" class="form-control" required>[[*{dataUrl}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">对列进行格式化时设置的函数名或者类型：</label>
                <div class="col-sm-8">
                    <input name="formatter" th:field="*{formatter}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">对应jqgrid的formatter属性,用于自定义列的显示样式：</label>
                <div class="col-sm-8">
                    <textarea name="formatterFunc" class="form-control" required>[[*{formatterFunc}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">排序时的默认值：</label>
                <div class="col-sm-8">
                    <input name="sort" th:field="*{sort}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">默认值：</label>
                <div class="col-sm-8">
                    <input name="defValue" th:field="*{defValue}" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: bootstrap-table" />
    <script th:inline="javascript">
        var prefix = ctx + "dynamic/column";
        $("#form-column-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-column-edit').serialize());
            }
        }
    </script>
</body>
</html>